﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace ASPItalia.ModelVirtualCasting.WPF.Common.Helpers
{
    public static class Design
    {
        private static Lazy<bool> _isInDesignMode;

        static Design()
        {
            _isInDesignMode = new Lazy<bool>(() => ((null == Application.Current) || Application.Current.GetType() == typeof(Application)));

        }

        /// <summary>
        /// Get if application is in design mode
        /// </summary>
        /// <returns></returns>
        public static bool GetIsInDesignMode()
        {
            return _isInDesignMode.Value;
        }
    }
}
